package com.base.cn.platform.os.service.course.qa.qaadd;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.course.CourseBaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 追问Service
 * @author LIZHIPENG
 * @since 2018/4/26
 */
@FeignClient(name = CourseBaseService.appName, configuration = FeignAuthConfig.class)
public interface QaAddService extends CourseBaseService {

    /**
     * 保存追问内容
     * @param questionAdd 追问信息
     * @param userId 用户ID
     * @return Map<String, Object>
     */
    @RequestMapping(contextPath + "/saveQuestionAdd")
    Map<String, Object> saveQuestionAdd(@RequestBody Map<String, Object> questionAdd,
                                        @RequestParam(value = "userId") BigDecimal userId);

    /**
     * 后台保存追答方法
     * @param questionAdd 追答内容信息
     * @return Map<String, Object>
     */
    @RequestMapping(contextPath + "/saveQuestionAddAnswer")
    Map<String, Object> saveQuestionAddAnswer(@RequestBody Map<String, Object> questionAdd);
}
